package 算法;

import java.util.ArrayList;
import java.util.List;

/**
 * @author coderFu
 * @create 2022/3/14
 */
public class TenNum {

    public static void main(String[] args) {
        long convert = Convert(new int[]{4, 3, 1});

        System.out.println(convert);
    }

    public static long Convert(int[] nums) {
        // write code here
        ArrayList<Integer> list = new ArrayList<>();
        for (int a : nums){
            list.add(a);
        }
        long sum = 0;
        int count = list.size()-1;
        for (Integer integer : list) {
            sum = (long) (sum + integer * Math.pow(5, count));
            count--;
        }
        return  sum;
    }
}
